package org.zoomdev.zoom.aop.test.shop.interceptor;

import org.zoomdev.zoom.aop.Interceptor;
import org.zoomdev.zoom.aop.Invoker;

import java.lang.reflect.Method;

public class LoginNotifyInterceptor implements Interceptor {
    @Override
    public Object intercept(Invoker invoker, Method method, Object target, Object[] args) throws Throwable {
        boolean ret = (Boolean) invoker.invoke(target, args);
        if (ret) {
            System.out.println("登录成功");
        }
        return ret;
    }
}
